package com.xlx.ui.domain.MO;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import javax.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 用户
 */
@ApiModel(value = "com-xlx-ui-domain-MO-User")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "`user`")
public class User {
    /**
     * ID
     */
    @Id
    @Column(name = "id")
    @GeneratedValue(generator = "JDBC")
    @ApiModelProperty(value = "ID")
    private Integer id;

    /**
     * 用户名
     */
    @Column(name = "`name`")
    @ApiModelProperty(value = "用户名")
    private String name;

    /**
     * 密码
     */
    @Column(name = "`password`")
    @ApiModelProperty(value = "密码")
    private String password;

    /**
     * 邮箱
     */
    @Column(name = "email")
    @ApiModelProperty(value = "邮箱")
    private String email;

    /**
     * 注册时间
     */
    @Column(name = "create_date")
    @ApiModelProperty(value = "注册时间")
    private Date createDate;

    /**
     * 状态
     */
    @Column(name = "`state`")
    @ApiModelProperty(value = "状态")
    private Boolean state;

    /**
     * 权限:0(管理员),1(用户)
     */
    @Column(name = "auth")
    @ApiModelProperty(value = "权限:0(管理员),1(用户)")
    private Integer auth;

    /**
     * 头像
     */
    @Column(name = "photo")
    @ApiModelProperty(value = "头像")
    private String photo;
}